<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/axios.min.js"></script>
    <script>
        function $(id) {
            return document.getElementById(id)
        }

        window.onload = function () {
            axios.get("/newuser/checkUser").then(resp => {
                var userInfo = resp.data;
                if (userInfo == "请先登录") {
                    $("aInfo").innerHTML = userInfo
                } else {
                    $("wel").innerHTML = userInfo
                }
            })
        }


    </script>
</head>
<body>
<a id="aInfo" href="/login.html"></a>
<span id="wel"></span>

</body>
</html>